<template>
	<navbar title="销售信息填写" :isBack="true"></navbar>
	<view class="" style="width: 100%;height: 100vh;background-color: #F9F9F9;padding: 30rpx;">
		<view class="" style="width: 100%;background-color: white;border-radius: 10rpx;padding: 30rpx;">
			<view class="" style="font-size: 30rpx;font-weight: bold;">
				请填写个人信息
			</view>
			<u-form :model="formInfo" ref="form1">
				<u-form-item label="姓名" prop="name"><u-input v-model="formInfo.name"
						placeholder="请输入姓名" /></u-form-item>
				<u-form-item label="姓名" prop="code"><u-input v-model="formInfo.code"
						placeholder="请输入身份证号" /></u-form-item>
				<u-form-item label="简介" :label-style="{fontSize:'30rpx',fontWeight:'bold'}" prop="memo"
					label-position="top" :border-bottom="false">
					<view class="" style="position: relative;">
						<u-input v-model="formInfo.memo" type="textarea" border placeholder="请填写备注信息" :maxlength="300"
							@input="sumfontnum" height="200" />
						<view class="" style="position: absolute;bottom: 0;right: 20rpx;color: #9A9A9A;font-size: 24rpx;">
							{{fontNum}}/300
						</view>
					</view>

				</u-form-item>
			</u-form>
		</view>
		<view class="" @tap="submit"
			style="margin-top: 150rpx;width: 100%;height: 98rpx;border-radius: 110rpx;display: flex;justify-content: center;align-items: center;background-color: #405EEC;color: white;font-size: 32rpx;">
			提交
		</view>
	</view>
</template>

<script setup lang="ts">
	import {
		onLoad,
		onShareAppMessage,
		onShareTimeline,
		onReachBottom
	} from '@dcloudio/uni-app'
	import {
		reactive,
		ref
	} from 'vue'
	import tools from '@/utils/tools'
	const fontNum = ref(0)
	const formInfo = reactive({
		name: "",
		code: "",
		memo: ""
	});
	const sumfontnum = (e) => {
		console.log(e);
		fontNum.value = e.length
	}
	const submit = ()=>{
		tools.navTo('/pagesA/sale/result')
	}
</script>

<style scoped lang="scss">
</style>